proc sndnote {nick handle otbn1 botnet2 host chan} {
global botnick home
if {$otbn1 == ""} {
  putserv "NOTICE $nick :ERROR - No Recipient Specified - You need to specify a recipient."
  return 0
  }
if {$botnet2 == ""} {
  putserv "NOTICE $nick :ERROR - No Message Specified - You need to specify a message to send to '\002$otbn1\002'" 
  return 0
  }
if {[onchan $otbn1 $chan]} {
  set hand2 [nick2hand $otbn1 $chan]
} elseif {[validuser $otbn1]} {
  set hand2 $otbn1
  } else {
  putserv "NOTICE $nick :ERROR - Not Found In User Partition - The user '\002$otbn1\002' could not be found in user partition."
  return 0
  } 
  set result [sendnote $handle $hand2 $botnet2]
if {$result == "0"} {
  putserv "NOTICE $nick :ERROR - Delivery Failed - Unreachable User."  
  return 0
  }
if {$result == "1"} {  
  putserv "NOTICE $nick :Success - Message delivered to \002$otbn1\002 ($hand2)"        
  return 0
  }
if {$result == "2"} {
  putserv "NOTICE $nick :Success - Message delivered to \002$otbn1\002 ($hand2)" 
  return 0
  }
if {$result == "3"} {
  putserv "NOTICE $nick :ERROR - Delivery Failed - \002$hand2\002's virtual notebox is currently full."
  return 0
  }
if {$result == "4"} {
  putserv "NOTICE $nick :ERROR - Delivery Failed - Unexpected error,try re-sending the note.If the problem persist contact your local botnet administrator."
  return 0
  }
if {$result == "5"} {
  putserv "NOTICE $nick :ERROR - Success - Message delivered sucessfully to \002$otbn1\002's ($hand2) notebox."
  return 0
  }
  }


